package com.youme.model

import com.google.gson.Gson
import com.google.gson.annotations.SerializedName
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody

/**
 * @Time:2021/3/19 10:21
 * @Author:wujinsheng
 * @Description:
 */

data class Profile(
    @SerializedName("avatar") var avatar: String,
    @SerializedName("deptId") var deptId: Int,
    @SerializedName("email") var email: String,
    @SerializedName("nickName") var nickName: String,
    @SerializedName("phonenumber") var phonenumber: String,
    @SerializedName("sex") var sex: String,
    @SerializedName("userId") var userId: Int,
    @SerializedName("userName") var userName: String
) {
    fun toBody(): RequestBody = RequestBody.create("application/json".toMediaType(), Gson().toJson(this))
}
